<div ng-controller="numberGroupCtrl">
    <div class="form-group">
        <button type="button" class="btn-primary btn-sm" ng-click="addGroup()">添加</button>

        <div id="tab_group">
            <table class="table">
                <thead>
                <tr>
                    <th>集合名</th>
                    <th>小号数</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="group in groupList">
                    <td>{{group.groupName}}</td>
                    <td>{{group.sendNumbers.length}}</td>
                    <td>
                        <button id="editbtn" type="submit" class="btn btn-default"
                                ng-click="editGroup(group)">编辑
                        </button>
                        <button id="delbtn" type="submit" class="btn btn-default"
                                ng-click="deleteGroup(group)">删除
                        </button>
                    </td>

                </tr>
                </tbody>
            </table>
        </div>

        <button type="button" class="btn-primary btn-sm" onclick="history.back()">返回</button>
    </div>

    <div class="modal fade" id="usernumber_model" tabindex="-1" role="dialog" aria-labelledby="helpModalLabel"
         aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span
                            aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h5 class="modal-title" id="myModalLabel">发帖账号详情</h5>
                </div>
                <div class="modal-body">
                    <form class="form-inline">
                        <!--<div class="form-group">-->
                        <!--<label style="float: left; margin-left:0px" class="control-label" for="textinput">发帖号码:</label>-->
                        <label class="control-label"style="float: left;" for="textinput">名称:</label>
                        <input type="text" class="form-control" placeholder="" style="float: left;margin-left:50px;width: 260px"
                               ng-model="groupName">
                        <br><br>
                        <label class="control-label" style="float: left;vertical-align:middle ;margin-left:0px;" for="textinput">发帖号码:</label>
                        <input type="text" class="form-control" placeholder="" style="float: left;margin-left:23px;width: 260px"
                               ng-model="sendNumber">

                        <label class="control-label"style="float: left;" for="textinput">备注:</label>
                        <input type="text" class="form-control" placeholder="" style="float: left;margin-left:20px;width: 260px"
                               ng-model="userRemark">
                        <button style="float: left;margin-left:10px;" id="addbtn" type="submit" class="form-control btn btn-secondary"
                                ng-click="addNewNumber(sendNumber,userRemark)">添加
                        </button>
                        <!--</div>-->
                    </form>
                    <div id="tab_user">
                        <table class="table">
                            <thead>
                            <tr>
                                <th>小号</th>
                                <th>昵称</th>
                                <th>小区</th>
                                <th>备注</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr ng-repeat="user in userList">
                                <td>{{user.huanxinUserName}}</td>
                                <td>{{user.nickName}}</td>
                                <td>{{user.community.communityName}}</td>
                                <td>{{user.userremark}}</td>
                                <td>
                                    <button id="deluserbtn" type="submit" class="btn btn-default"
                                            ng-click="deleteNumber(user)">删除
                                    </button>
                                </td>

                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button id="saveButton" type="submit"class="btn btn-default"
                            ng-click="saveGroup()">保存
                    </button>
                </div>
            </div>
        </div>
    </div>

</div>

